package com.jiazixuan.stock.mapper;

import com.jiazixuan.stock.pojo.domain.InnerMarketDomain;
import com.jiazixuan.stock.pojo.entity.StockMarketIndexInfo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 17127
* @description 针对表【stock_market_index_info(国内大盘数据详情表)】的数据库操作Mapper
* @createDate 2025-08-14 11:17:57
* @Entity com.jiazixuan.stock.pojo.entity.StockMarketIndexInfo
*/
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);

    List<InnerMarketDomain> getMarketInfo(@Param("curDate") Date curDate, @Param("marketCodes") List<String> marketCodes);

    /**
     *
     * @param openTime 开盘时间
     * @param endTime  结束时间
     * @param marketCodes  股票id集合
     * @return
     */
    List<Map> getSumAmtInfo(@Param("openTime") Date openTime, @Param("endTime") Date endTime, @Param("marketCodes") List<String> marketCodes);

    /**
     * 批量插入大盘数据
     * @param entities 大盘实体对象集合
     * @return
     */
    int insertBatch(@Param("infos") List<StockMarketIndexInfo> entities);
}
